<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="tiles"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html>
<html>
<head>
<!-- init css files -->
<link rel="stylesheet" href="<c:url value="/resources/css/loading-modal.css" />" />
<link rel="stylesheet" href="<c:url value="/resources/css/foundation/docs-16.css" />">
<!-- init js file -->
<script src="<c:url value="/resources/js/vendor/modernizr.js"/>"></script>
<script src="<c:url value="/resources/js/vendor/jquery.js" />"></script>
<script src="<c:url value="/resources/js/vendor/all.js"/>"></script>
<script src="<c:url value="/resources/js/jquery-ui.js"/>"></script>
<title><tiles:insertAttribute name="title" /></title>

<script type="text/javascript">
	var time = 10; //How long (in seconds) to countdown
	var page = "${pageContext.request.contextPath}"; //The page to redirect to
	function countDown(){
		time--;
		gett("container").innerHTML = time;
		if(time == -1){
			window.location = page;
			}
		}
	function gett(id){
		if(document.getElementById) return document.getElementById(id);
		if(document.all) return document.all.id;
		if(document.layers) return document.layers.id;
		if(window.opera) return window.opera.id;
		}
	function init(){
		if(gett('container')){
			setInterval(countDown, 1000);
			gett("container").innerHTML = time;
		}else{
			setTimeout(init, 50);
		}
	}
document.onload = init();
</SCRIPT>
</head>
<body class="antialiased hide-extras">
	<div id="loading" class="loading-modal" style="display: none"></div>
	<div id="loading-bottom-small" class="loading-modal-bottom-small" style="display: none"></div>
	<tiles:insertAttribute name="js" />
	<tiles:insertAttribute name="body" />
	<tiles:insertAttribute name="jsbottom" />
	<script>
		$(document).ready(function () {
			function stickyFooter() {
				var footer = $("#footer");
				var pos = footer.position();
				var height = $(window).height();
				height = height - pos.top;
				height = height - footer.outerHeight();

				if (height > 0) {
					footer.css({
						'margin-top': height + 'px'
					});
				}
			}
			stickyFooter();
			$(window).resize(function () {
				stickyFooter();
			});
		});
	</script>
</body>
</html>
